package com.doit.demo01;

public class test01 {
    public static void main(String[] args){
    My_Thread mt = new My_Thread();
    mt.setName("窝嫩跌");
    mt.start();
//currentThread 当前的线程
        //currentThread 当前的线程
        //currentThread 当前的线程
        /*
            currentThread
            currentThread
            currentThread
            currentThread
            currentThread


        */
    Thread  t = new Thread(new Runnable() {
        @Override
        public void run() {
            Thread.currentThread().setName("小宝");
            for (int i = 0; i < 50; i++) {
                System.out.println(Thread.currentThread().getName()+" "+i);
            }
        }
    });
    t.start();
        for (int i = 0; i < 50; i++) {
            System.out.println(Thread.currentThread().getName()+"  "+i);
        }

    }

}
